package com.daoeping.service.impl;

import java.util.List;
import java.util.Date;
import com.daoeping.dao.Usr_userbasicinfoDAO;
import com.daoeping.data.Usr_userbasicinfo;
import com.daoeping.service.Usr_UserbasicinfoService;

public class Usr_UserbasicinfoServiceImpl implements Usr_UserbasicinfoService {
	
	private Usr_userbasicinfoDAO usr_userbasicinfoDAO;
	Date now = new Date();
	
	public Usr_userbasicinfoDAO getUsr_userbasicinfoDAO() {
		return usr_userbasicinfoDAO;
	}

	public void setUsr_userbasicinfoDAO(Usr_userbasicinfoDAO usr_userbasicinfoDAO) {
		this.usr_userbasicinfoDAO = usr_userbasicinfoDAO;
	}

	public Date getNow() {
		return now;
	}

	public void setNow(Date now) {
		this.now = now;
	}

	@Override
	public boolean addUsr_userbasicinfo(Usr_userbasicinfo usr_userbasicinfo) {
		// TODO Auto-generated method stub
		usr_userbasicinfo.setRegisteredDate(now);
		return this.usr_userbasicinfoDAO.insertData(usr_userbasicinfo);
	}

	@Override
	public boolean editUsr_userbasicinfo(Usr_userbasicinfo usr_userbasicinfo) {
		// TODO Auto-generated method stub
		return this.usr_userbasicinfoDAO.updateData(usr_userbasicinfo);
	}

	@Override
	public boolean delUsr_userbasicinfo(Usr_userbasicinfo usr_userbasicinfo) {
		// TODO Auto-generated method stub
		return this.usr_userbasicinfoDAO.deleteData(usr_userbasicinfo);
	}

	@Override
	public List<Usr_userbasicinfo> findUsr_userbasicinfoList() {
		// TODO Auto-generated method stub
		return this.usr_userbasicinfoDAO.findUsr_userbasicinfoList();
	}

	@Override
	public List<Usr_userbasicinfo> findUsr_userbasicinfoById(int id) {
		// TODO Auto-generated method stub
		return this.usr_userbasicinfoDAO.findUsr_userbasicinfoById(id);
	}

	public List<Usr_userbasicinfo> findUsr_userbasicinfoByUserId(int user_id) {
		// TODO Auto-generated method stub
		return this.usr_userbasicinfoDAO.findUsr_userbasicinfoByUserId(user_id);
	}
}
